package com.crr.controller;

import com.crr.common.bean.ResultBean;
import com.crr.common.controller.BaseController;
import com.crr.service.GoodsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@Api(tags = "秒杀系统")
@RequestMapping("/v1")
public class GoodsController extends BaseController {
    @Autowired
    GoodsService goodsService;
    @ApiOperation("秒杀列表")
    @GetMapping ("/goods")
    public ResultBean query(){
        List<Map> query = goodsService.query();
        return success("秒杀产品列表",query);
    }

}
